package timing.ukulele.third.convertor.msg;

import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;
import timing.ukulele.common.data.DtoBaseDataConverter;
import timing.ukulele.data.third.data.msg.ChannelAccountDTO;
import timing.ukulele.data.third.view.msg.ChannelAccountVO;
import timing.ukulele.third.persistent.msg.ChannelAccount;

@Mapper
public interface ChannelAccountConverter extends DtoBaseDataConverter<ChannelAccount, ChannelAccountDTO, ChannelAccountVO> {

    ChannelAccountConverter INSTANCE = Mappers.getMapper(ChannelAccountConverter.class);

    @Override
    @Mappings({
            @Mapping(target = "createBy", ignore = true),
            @Mapping(target = "createTime", ignore = true),
            @Mapping(target = "updateBy", ignore = true),
            @Mapping(target = "updateTime", ignore = true),
    })
    ChannelAccount v2p(ChannelAccountVO vo);

    @Override
    ChannelAccountVO p2v(ChannelAccount po);

}
